<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script>
		function test() {
			var local = "local 局部变量";

			console.log(local);
		}

		test();

		console.log(local);
	</script>
</body>
</html>